﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <title></title>
        <link href="../window/css/window.css" rel="stylesheet" />

        <script src="../source/js/common_url.js"></script>
        <script src="../source/js/util.js"></script>
        <script src="../nurse_mgr/js/common_data.js"></script>
        <script src="../source/js/jquery-1.9.1.min.js"></script>
        <script src="../source/layer/layer.js"></script>
    </head>
    <body>
        <div class="d_content">
            <div class="s_right">
                <span>备注</span>
            </div>
            <div id="s_right">
                <span><textarea rows='3' cols='50' maxlength="50" style="border:1px solid #cccccc;" id="remark" value=""> </textarea></span>
            </div>
        </div>
    </body>
</html>
<script type="text/javascript">
    var _id = "";
    // 加载备注内容
    $(function () {
        _id = GetQueryString("id");
        var remark = GetQueryString("remark");
        console.log("remark:" + remark);
        $("#remark").val(remark);
    })

    function updateRemark(){
        var remark = document.getElementById("remark").value;
        var ret = false;
        // 调用延时方法
        $.ajax({
            url: _updateRemark,
            type: "post",
            async:false,
            data: {
                id: _id,
                remarks: remark,
            },
            success: function (data) {
                var result = JSON.parse(data);
                if (result.status == 0){
                    layer.msg("操作成功!");
                    ret = true;
                }else{
                    layer.alert(result.desc);
                    ret = false;
                }
            },
            error: function (jqXHR, textStatus, errorThrown) {
                console.log(textStatus);
                console.log(errorThrown);
                layer.alert("操作失败!");
                ret = false;
            }
        });

        return ret;
    }
</script>


